package com.shenyi.core.velocity;

import org.apache.velocity.tools.Scope;
import org.apache.velocity.tools.config.ToolboxConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author richard.fan
 * @version 1.0
 * @date 2018/11/07
 * @desc 配置
 * @see
 * @since 1.0
 */
@Configuration
public class VelocityConfig {


    @Bean
    public ToolboxConfiguration toolboxConfiguration() {
        ToolboxConfiguration toolboxConfiguration = new ToolboxConfiguration();
        toolboxConfiguration.setScope(Scope.APPLICATION);
        toolboxConfiguration.setProperty("shiro", new VelocityShiro());
        return toolboxConfiguration;
    }
}
